<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>调查问卷详情表</title>
    <link rel="stylesheet" href="../static/css/bootstrap.min.css">
</head>

<body>


    <div class="container" style="margin-top: 30px">
        <div class="row">
            <div class="col-xs-3">
                <ul class="nav nav-pills nav-stacked">
                    <li role="presentation" class="active"><a href="#">修改密码</a></li>
                    <li role="presentation" data-toggle="modal" data-target="" onclick=""><a href="#">调查问卷相关信息</a></li>
                    <li role="presentation" class="active" data-toggle="modal" data-target="" onclick=""><a
                            href="#">单位管理</a></li>

                    <li role="presentation" class="active" data-toggle="modal" data-target="" onclick=""><a
                            href="#">用户管理</a></li>

                    <li role="presentation" class="active" data-toggle="modal" data-target="" onclick=""><a
                            href="#">日志管理</a></li>


                </ul>
            </div>

            <div class="col-md-9">
                <ul class="list-group" style="height:20rem;width: 80rem;">
                    <a class="list-group-item active"> 问卷调查管理系统 </a>
                    <div class="list-group-item">

                        <h4 class="list-group-item-heading" style="color:black">
                            欢迎{{username}}超级管理员</h4>

                        <a href="#" style="float: right" onclick="logout()">退出系统&nbsp;</a>
                        <h1></h1>


                    </div>
                    <table class="table table-dark">
                        <thead>
                            <tr>
                                <th>#</th>
                                <th>主题</th>
                                <th>说明</th>
                                <th>问题1</th>
                                <th>问题2</th>
                                <th>问题3</th>
                                <th>问题4</th>
                                <th>问题5</th>
                                <th>问题6</th>
                                <th>问题7</th>
                                <th>问题8</th>
                                <th>问题9</th>
                                <th>问题10</th>
                                <th>总分</th>
                                <th>平均分</th>
                                <th>操作</th>




                            </tr>
                        </thead>
                        <tbody>
                            {% for QSA in scores %}
                            <tr>
                                <th scope="row">{{QSA.id}}</th>
                                <td>{{QSA.topic}}</td>
                                <td>{{QSA.introduction}}</td>
                                <td>{{QSA.oneAnswer}}</td>
                                <td>{{QSA.twoAnswer}}</td>
                                <td>{{QSA.threeAnswer}}</td>
                                <td>{{QSA.fourAnswer}}</td>
                                <td>{{QSA.fiveAnswer}}</td>
                                <td>{{QSA.sixAnswer}}</td>
                                <td>{{QSA.sevenAnswer}}</td>
                                <td>{{QSA.eightAnswer}}</td>
                                <td>{{QSA.nineAnswer}}</td>
                                <td>{{QSA.tenAnswer}}</td>
                                <td>{{QSA.sumScore}}</td>
                                <td>{{QSA.avgScore}}</td>
                                <td><a onclick="system()">返回</a></td>
                              
                            </tr>

                            {% endfor %}
                          
                        </tbody>
                    </table>
                </ul>

            </div>



        </div>

    </div>




    <script src="../static/js/jquery-3.6.0.min.js"></script>
    <script src="https://cdn.bootcss.com/axios/0.18.0/axios.min.js"></script>
    <script src="../static/js/bootstrap.min.js"></script>
    <script>
        //退出系统
        function logout() {
            axios({
                method: 'post',
                url: '/logout'
            }).then(function (response) {
                // axios工具下，服务器真正返回的数据在返回对象的data中
                let res = response.data;
                if (res.code === 200) {
                    window.location.href = '/admin';
                }
            }).catch((err) => {

            });
        }

        //返回后台管理系统
        function system(){
            window.location.href='/manager'
        }
    </script>
</body>

</html>